package org.spice.servlet.tags;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.PageContext;
import javax.servlet.jsp.tagext.DynamicAttributes;

public class SubmitTag extends BaseTag implements DynamicAttributes {

	private static final long serialVersionUID = 1L;

	protected String ref;

	protected Boolean isValidation;

	protected String name;

	protected String value;

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Boolean getIsValidation() {
		return isValidation;
	}

	public void setIsValidation(Boolean isValidation) {
		this.isValidation = isValidation;
	}

	public String getRef() {
		return ref;
	}

	public void setRef(String ref) {
		this.ref = ref;
	}

	@Override
	public int doEndTag() throws JspException {
		return super.doEndTag();
	}

	@Override
	public int doAfterBody() throws JspException {
		return super.doAfterBody();
	}

	@Override
	public void setDynamicAttribute(String uri, String localName, Object value)
			throws JspException {

	}

	@Override
	public int writeTag(PageContext pageContext) {
		try {
				this.pageContext.getOut().append(
						"<input type=\"submit\" value = \"" + getValue()
								+ "\"  />");
		} catch (Exception e) {
			e.printStackTrace();
		}

		return SKIP_BODY;
	}

}
